set (mlgesture_VERSION_MAJOR 1)
set (mlgesture_VERSION_MINOR 0)
SET (VERSION 1.0)

SET(mlgesture_SOURCES hmm.cpp handtracker.cpp handgestureexception.cpp handdetector.cpp gestureutils.cpp dialogs/skinthresholddialog.cpp svm.cpp mlgesture.cpp trajectory.cpp control.cpp dynamicgesture.cpp staticgesture.cpp skindetector.cpp gestureevent.cpp statechangeevent.cpp handsmoveevent.cpp  staticbeginevent.cpp staticendevent.cpp dynamicevent.cpp handgestureevent.cpp eventmanager.cpp)
SET(mlgesture_HEADERS_TO_MOC dialogs/skinthresholddialog.h)
SET(mlgesture_FORMS dialogs/skinthresholddialog.ui)

set (CMAKE_MLGESTURE_LIBRARY ON)

configure_file (
  "${CMAKE_CURRENT_SOURCE_DIR}/mlgesture_config.h.in"
  "${CMAKE_CURRENT_SOURCE_DIR}/mlgesture_config.h"
  )


QT4_WRAP_UI(mlgesture_FORMS_HEADERS ${mlgesture_FORMS})
QT4_WRAP_CPP(mlgesture_HEADERS_MOC ${mlgesture_HEADERS_TO_MOC})

INCLUDE(${QT_USE_FILE})

ADD_DEFINITIONS(${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

add_library(mlgesture SHARED ${mlgesture_SOURCES} ${mlgesture_HEADERS_MOC} ${mlgesture_FORMS_HEADERS})

IF( WIN32 )
SET_TARGET_PROPERTIES( mlgesture PROPERTIES
OUTPUT_NAME "mlgesture-${VERSION}"
VERSION ${VERSION} )
ELSE()
SET_TARGET_PROPERTIES( mlgesture PROPERTIES
VERSION ${VERSION}
SOVERSION ${VERSION})
ENDIF()

install(TARGETS mlgesture DESTINATION lib)
install(FILES hmm.h handgestureexception.h gestureutils.h svm.h mlgesture.h mlgesture_global.h trajectory.h gestureevent.h  statechangeevent.h  handsmoveevent.h  staticbeginevent.h  staticendevent.h dynamicevent.h handgestureevent.h gestureobserver.h DESTINATION include/mlgesture)
install(FILES dialogs/skinthresholddialog.h DESTINATION include/mlgesture/dialogs)
